<?php

!defined('DEBUG') AND exit('Access Denied.');

$i = param(1);

if($i=='catalog'){

	$cid = param(2, 1);
	$page = 1;
	$pagesize = 20;
	$notice = db_find('article', array('cid'=>1), array('time'=>'-1'), $page, $pagesize);
	$news = db_find('article', array('cid'=>2), array('time'=>'-1'), $page, $pagesize);
	$header['title'] = '新闻中心 - '.$conf['sitename'];
	include show_tpl('article_catalog.htm');

}else if($i=='modal'){
	$id = param(2, 1);
	$article = db_find_one('article', array('id'=>$id));
	if(!$article) exit('没有内容');
	include show_tpl('article_modal.htm');

}else{

	$article = db_find_one('article', array('id'=>$i));
	if(!$article) exit;
	$header['title'] = $article['title'].' - '.$conf['sitename'];
	include show_tpl('article_show.htm');

}




?>